package cn.xinyangtong.shopping.portal.controller;

import cn.xinyangtong.facade.rest.ContentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * Created by fengbo on 2017/7/18.
 */
@Controller
public class HomeController {

    @Autowired
    private ContentService contentService;

    @RequestMapping(value = {"", "/index"})
    public String showIndex(Model model) {
        String adJson = contentService.getContentList(89L);
        model.addAttribute("ad1", adJson);
        return "index";
    }
}
